<%@page import="java.util.List"%>
<%@include file="head.jsp" %>
<div id="container" class="searchResult">
  <div id="content">
    <h1>Search Result</h1>
    <table class="lists">
    <thead>
    <th>First Name</th>
          <th>Last Name</th>
          <th>E-mail</th>
            <th>street</th>
          <th>country</th>
          <th>zip</th>
          <th>city</th>
          <th>PhoneType</th>
          <th>PhoneNumber</th>
    </thead>
    <tfoot>
    <tr>
          <th>First Name</th>
          <th>Last Name</th>
          <th>E-mail</th>
            <th>street</th>
          <th>country</th>
          <th>zip</th>
          <th>city</th>
          <th>PhoneType</th>
          <th>PhoneNumber</th>
        </tr>
    </tfoot>
      <tbody>
        <%
          List lists = (List) request.getAttribute("list");
           if(lists==null)return;
          for (int i = 0; i < lists.size(); i++) {
            Object[] list = (Object[])lists.get(i);
            if(i%2 ==1){
                out.println("<tr class=\"odd\">");
              } else {
                out.println("<tr>");
              }
            for (int j = 0; j < list.length; j++) {
              out.println("<td>");
              out.println(list[j]);
              out.println("</td>");
            }
            out.println("</tr>");
          }
        %>
      </tbody>
    </table>
<form method="get" action="ListRecordsServlet">

     <p class="submit"><input type="submit" value="Return"></p>

</form>
  </div>
</div>
<%@include file="foot.jsp" %>